package com.cqtczh.qhd.driver.acticity;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TabHost;
import android.widget.TextView;
import android.widget.Toast;
import com.google.zxing.CaptureActivity;
import com.lidroid.xutils.BitmapUtils;
import com.lidroid.xutils.bitmap.BitmapDisplayConfig;
import com.lidroid.xutils.bitmap.callback.BitmapLoadCallBack;
import com.lidroid.xutils.bitmap.callback.BitmapLoadFrom;
import com.cqtczh.qhd.driver.R;
import com.cqtczh.qhd.driver.acticity.base.BaseActivity;
import com.cqtczh.qhd.driver.api.GagApi;
import com.cqtczh.qhd.driver.utils.StringUtils;
import com.cqtczh.qhd.driver.view.cpbutton.ZoomImageView;

public class ImageDetailsActivity extends BaseActivity {
	
	ImageView zoomImageView;
	@SuppressLint("NewApi")
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.image_details);
		zoomImageView = (ImageView) findViewById(R.id.zoom_image_view);
		String path = getIntent().getExtras().getString("path");
		System.out.println("path"+path);
		BitmapUtils  bitmapUtils  = new BitmapUtils(this);
	//	bitmapUtils.display(zoomImageView,  GagApi.SOURCEADRR + path);
		bitmapUtils.display(zoomImageView,   path);
		zoomImageView.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				finish();
			}
		});
	/*	bitmapUtils.display( null,  GagApi.SOURCEADRR + path, new BitmapLoadCallBack<View>() {

			@Override
			public void onLoadCompleted(View arg0, String arg1, Bitmap bitmap,
					BitmapDisplayConfig arg3, BitmapLoadFrom arg4) {
				// TODO Auto-generated method stub
				System.out.println("arg1"+arg1);
				if(bitmap!=null){
				zoomImageView = (ZoomImageView) findViewById(R.id.zoom_image_view);
				zoomImageView.setImageBitmap(bitmap);  }
			}

			@Override
			public void onLoadFailed(View arg0, String arg1, Drawable arg2) {
				// TODO Auto-generated method stub
				showLongToast("失败啊啊 ");
			}
		});*/
		}
}
